package com.briup.cms.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.briup.cms.bean.Comment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.briup.cms.bean.extend.CommentExtend;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author briup
 * @since 2025-03-19
 */
public interface CommentDao extends BaseMapper<Comment> {

    void queryByArticleId(IPage<CommentExtend> page, Long aId);

    // 分页+条件查询一级评论
    IPage<CommentExtend> query(IPage<CommentExtend> page,
                               @Param("keyword") String keyword,
                               @Param("userId") Long userId,
                               @Param("articleId") Long articleId,
                               @Param("startTime") LocalDateTime startTime,
                               @Param("endTime") LocalDateTime endTime);
}
